<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/jsp/common.jsp"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<%@ include file="/WEB-INF/jsp/importHead.jsp"%>
<%@ include file="/WEB-INF/jsp/importCommonCss.jsp"%>
<link rel="stylesheet" type="text/css" href="${basePath }/css/news.css" />
<style>
.custom_page {
	padding: 9px 15px;
	border: 1px solid #e4eaec;
	border-right: none;
	background: #fff;
	text-align: center;
	color: #76838f;
}

.custom_page:hover {
	background: #f5f5f5;
	text-decoration: none;
}

.news_list_detail_met_16_1.met-shownews{
	padding: 30px 0;
	background: #f2f2f2;
}
.news_list_detail_met_16_1.met-shownews .met-shownews-body{
	background:#ffffff;
	-webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
    -o-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
    -ms-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
}
.news_list_detail_met_16_1 .border-bottom1,.news_list_detail_met_16_1 .border-top1,.news_list_detail_met_16_1 .met-page .pagination li a{border-color: #666666;border-color: ;}
.news_list_detail_met_16_1 .details-title{padding:20px;}
.news_list_detail_met_16_1 .details-title h1{font-size:30px;line-height:1.5;color: #333333;}
.news_list_detail_met_16_1 .details-title h1{color: ;}
.news_list_detail_met_16_1 .details-title .info{font-size:16px;color:black;}
.news_list_detail_met_16_1 .details-title .info{color:;}
.news_list_detail_met_16_1 .details-title .info span{padding-right:10px;}
.news_list_detail_met_16_1 .met-page .pagination li a{color:#666666; color:;}
.news_list_detail_met_16_1 .page-link:focus,.news_list_detail_met_16_1 .page-link:hover{background-color: transparent;background-color: ; }
@media (max-width:767px){
	.news_list_detail_met_16_1 .details-title{padding-bottom:10px;}
	.news_list_detail_met_16_1 .details-title h1{font-size:24px;}
	.news_list_detail_met_16_1 .details-title .info{font-size:14px;}
}
@media (max-width:349px){
	.news_list_detail_met_16_1 .details-title h1{font-size:20px;}
}
.news_list_detail_met_16_1 .met-editor {
    padding: 30px;
    width: 100%;
    max-width: 100%;
    font-size: 18px;
    font-weight: 300;
    line-height: 1.8;
    color: #222;
    word-wrap: break-word;
}
.tag{font-size:14px;color:#666;padding:0 30px 30px;}
.tag a{color:#666;padding:5px;}
.tag a:hover{color:#0075c1;color:;}
.met-page{padding-top:0 !important;}
.met-page a:hover{color:#0075c1 !important;color: !important;}
.met-page .pagination li a{white-space: nowrap;text-overflow: ellipsis;
    overflow: hidden;}
</style>
</head>
<body class="met-navfixed">
	<%@ include file="/WEB-INF/jsp/importHeader.jsp"%>
	<div class="banner_met_11_5 page-bg" style='' m-id='2' m-type="banner">
		<div class="slick-slide">
			<img class="cover-image"
				src="${basePath}/images/07/29/1521444892.png"
				srcset='${basePath}/images/07/29/1521444892.png 767w,${basePath}/images/07/29/1521444892.png'
				sizes="(max-width: 767px) 767px" alt="" data-height='0|0|0'
				data-fade="false" data-autoplayspeed=4000 data-speed="1000"
				data-hex="|0.48" data-m="0">
		</div>
	</div>

	<main class="news_list_detail_met_16_1 met-shownews animsition">
	<div class="container">
		<div class="row">
			<div class="col-md-9 met-shownews-body" m-id="23">
				<div class="row">
					<section class="details-title border-bottom1">
					<h1 class="m-t-10 m-b-5">${article.title }</h1>
					<div class="info font-weight-300">
						<fmt:formatDate value="${article.insertTime}" pattern="yyyy-MM-dd" var="insertTime" />
						<c:if test="${!empty insertTime}">
							<span>${insertTime }</span>
						</c:if>
						<c:if test="${!empty article.insertUser}">
							<span>发布者：${article.insertUser}</span>
						</c:if>
						<c:if test="${!empty article.provider}">
							<span>提供者：${article.provider}</span>
						</c:if>
						<span> <i
							class="icon wb-eye m-r-5" aria-hidden="true"></i> ${article.viewCounts }
						</span>
						<%-- <c:if test="${updateTime != insertTime}">
							<p class="am-article-meta">再编辑于&nbsp;${updateTime}</p>
						</c:if> --%>
						<c:if test="${!empty article.imagePath }">
							<div class="am-article-lead am-margin-vertical">
								<p><img src="${article.imagePath }" style="max-width: 100%;"/></p>
							</div>
						</c:if>
						<c:if test="${!empty article.description }">
							<div class="am-article-bd">
								<p class="am-article-lead">${article.description }</p>
							</div>
						</c:if>
						<c:if test="${!empty article.industry }">
							<div class="am-article-lead am-margin-vertical">
								<div class="am-container">
									<div class="am-u-sm-4 am-u-md-3 am-u-lg-2">
										<span class="am-article-meta">行业分类：${article.industry}</span>
										<c:if test="${!empty article.subIndustry }">
											<span style="margin-left: 4em;" class="am-article-meta">行业子分类：${article.industry}</span>
										</c:if>
									</div>
								</div>
							</div>
						</c:if>
					</div>
					</section>
					<section class="met-editor clearfix" deep="5">
					${article.content }
					</section>
					
					<c:if test="${!empty article.attachments}">
						<section class="details-title border-bottom1 border-top1" deep="5">
						<c:forEach items="${article.attachments }" var="a"
							varStatus="status">
							<div class="am-article-bd">
								<label class="am-article-lead">附件 </label>
								<c:choose>
									<c:when test="${fn:length(a.fileName) > 20}">
										<c:set var="fileName"
											value="${fn:substring(a.fileName, 0, 20)}..." />
									</c:when>
									<c:otherwise>
										<c:set var="fileName" value="${a.fileName}" />
									</c:otherwise>
								</c:choose>
								<span class="am-article-lead" style="text-align: center; font-size: 1.2rem;" title="${a.fileName }"> ${fileName } </span>
								<button type="button"
									onclick="downloadAttachment('${fn:replace(a.filePath,'\\','/' )}','${a.fileName }')"
									class="custom_page" style="border: 1px solid #e4eaec;cursor: pointer;">
									<i class="am-icon-download">附件下载 </i>
								</button>
							</div>
						</c:forEach>
						</section>
					</c:if>
				</div>
			</div>
			<%@ include file="/WEB-INF/jsp/articleLeft.jsp"%>
		</div>
	</div>
	</main>
	<%@ include file="/WEB-INF/jsp/importFooter.jsp"%>
	<%@ include file="/WEB-INF/jsp/importCommonJS.jsp"%>
	<script charset="utf-8" src="${basePath }/js/common/index.js"></script>
	<script type="text/javascript">	
		function downloadAttachment(fileUrl,fileName){
			var form = document.createElement("form");
			form.action = "${basePath}/downloadAttachments";
			form.method = "post";
			form.target = "_blank";
			form.style.display = "none";
			var input = document.createElement("input");
			var input1 = document.createElement("input");
			input.name = "url";
			input.type = "hidden";
			input.value = fileUrl;
			input1.name = "fileName";
			input1.type = "hidden";
			input1.value = fileName;
			
			form.appendChild(input);
			form.appendChild(input1);
			
			document.body.appendChild(form);
			
			form.submit();
			document.body.removeChild(form);
		}
	</script>
</body>
</html>